Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

find_by_comparator

container.sorted_array.find_by_comparator

find index using a comparator function

The guaranteed performance is in O(log n) comparisons.

result is the index where cmp results in 0 or nil if no such index
was found in this array. In case several instance equal match,
the index of one matching key will be returned, but is not
specified which one.

NYI: CLEANUP: find better name
Postcondition
post
  match result
    i i32 => cmp sorted_array.this[i] = equal
    nil   => true
0.095dev (GIT hash 6fe4713e6f0ffc9fa21235ced6756ebe4d5da1fe)
last changed: 2026-05-22